# uncompyle6 version 3.2.3
# Python bytecode 3.6 (3379)
# Decompiled from: Python 3.6.8 |Anaconda custom (64-bit)| (default, Feb 21 2019, 18:30:04) [MSC v.1916 64 bit (AMD64)]
# Embedded file name: api\handlers\worker_frontend\__init__.py
__author__ = "Attila Gerendi (Sanyi)"
from api.handlers import ResourceHandler
from settings_provider import settings
from helpers.worker.settings_storage import SettingsStorage
from helpers.address import get_local_addresses
from server.http_responses.http_errors import Forbidden
from helpers.licensing.features import BaseLicense


class WorkerFrontendResourceHandler(ResourceHandler):
    def __init__(self, request_auth, base_path, remote_address, **_):
        super().__init__()
        self.request_auth = request_auth
        self.base_path = base_path
        if remote_address not in get_local_addresses():
            raise Forbidden()
        self.license = BaseLicense.get_license_from_license_data()
        self.settings_storage = settings["worker_settings_storage"]
